﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenCvSharp;
using OpenCvSharp.Blob;

namespace RecognitionNumbers
{
    public class Symbol
    {
        public IplImage[] lS;
        public char[] lN = { 'А', 'В', 'Е', 'К', 'М', 'Н', 'О', 'Р', 'С', 'Т', 'У', 'Х' ,'0', '1','2','3','4','5','6','7','8','9'};
    
        public Symbol()
        {
            
            lS = new IplImage[lN.Length];
            for (int i = 0; i < lN.Length; i++)
            {
                Image src= new Image("шрифт//"+lN[i]+".bmp");
                Gray сераяКартинка = new Gray(src.image);
                Binarization чбКартинка = new Binarization(сераяКартинка.output, 125);
                CvSize size = new CvSize(20, 20);
                IplImage t = new IplImage(size, чбКартинка.output.Depth, чбКартинка.output.NChannels);
               Cv.Resize(чбКартинка.output, t, Interpolation.Linear);
               //CvWindow df = new CvWindow(t);
            
                lS[i] = чбКартинка.output;

            }
        }

        
    }
}
